package com.guigu.service;


import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.guigu.mapper.EmployeeMapper;
import com.guigu.pojo.Employee;

@Service
public class EmployeeService {
	@Resource 
	EmployeeMapper employeeMapper;
	
	//分页显示
	public List<Employee> getAll()
	{
		return employeeMapper.selectByExampleWithDept(null);
	}
	
	//添加员工信息
	public int insertEmployee(Employee employee)
	{
		return employeeMapper.insert(employee);
	}
	
	//删除员工信息
	public int delEmployee(Integer id)
	{
		return employeeMapper.deleteByPrimaryKey(id);
	}
}
